﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Point3D
{
    class Program
    {
        static void Main(string[] args)
        {
            Point3D point = new Point3D(3, 5, 8);
            Console.WriteLine(DistanceIn3D.Distance(point, Point3D.o));
            
        }
    }
    public struct Point3D
    {
        public int x { get; set; }
        public int y { get; set; }
        public int z { get; set; }
        public static readonly Point3D o = new Point3D(0, 0, 0);

        public Point3D(int x, int y, int z) : this()
        {
            this.x = x;
            this.y = y;
            this.z = z;
        }
        public Point3D Origin
        {
            get { return o; }
        }
    }
    public static class DistanceIn3D
    {
        public static double Distance(Point3D point1, Point3D point2)
        {
            double distance = Math.Sqrt(Math.Pow(point1.x - point2.x, 2) + Math.Pow(point1.y - point2.y, 2) + Math.Pow(point1.z - point2.z, 2));
            return distance;
        }
    }
    class Path
    {
        public List<Point3D> path { get; set; }

        public Path(List<Point3D> path)
        {
            this.path = path;
        }
    }
}
